package com.dyh.quickdemozwei.controller0824;

import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/delete")
public class DeleteController {

    @DeleteMapping("/delete")
    public void delete(){
        System.out.println("called");
    }

    @Setter@Getter
   static class Bnd {
        String a;
        int b;
        double c;

    }

    public static void main(String[] args) {
        List<Integer> l = new ArrayList<>(5);


        System.out.println();
//        System.out.println( String.format(str,"url1"));
    }

    private static void handle(List<JSONObject> list) {
        for (JSONObject jsonObject : list) {
            jsonObject.put("xx","yy");
        }
    }
//    public static void main(String[] args) {
//
//        String str = "";
//        Object obj1 = null;
//        Object obj2 = "";
//        Object obj3 = "123123,123";
//
//
//        List<String> v1 = Optional.ofNullable(obj1)
//                .map(String.class::cast)
//                .filter(e-> !StringUtils.isEmpty(e))
//                .map(e->Arrays.asList(e.split(",")))
//                .orElse(new ArrayList<>());
//
//        List<String> v2 = Optional.ofNullable(obj2)
//                .map(String.class::cast)
//                .filter(e-> !StringUtils.isEmpty(e))
//                .map(e->Arrays.asList(e.split(",")))
//                .orElse(new ArrayList<>())
//                        ;
//
//
//        List<String> v3 = Optional.ofNullable(obj3)
//                .map(String.class::cast)
//                .filter(e-> !StringUtils.isEmpty(e))
//                .map(e->Arrays.asList(e.split(",")))
//                .orElse(new ArrayList<>());
//
//        System.out.println();
//
//
////        String str1 ="商品主图2/3587322644304908189-商品主图-1.jpg";
////
////       "[{\"spec_detail_name1\":\"黑色\",\"spec_detail_name2\":\"\",\"spec_detail_name3\":\"\",\"stock_num\":55,\"price\":100,\"code\":\"\",\"step_stock_num\":0,\"supplier_id\":\"\",\"outer_sku_id\":\"\",\"delivery_infos\":[{\"info_type\":\"weight\",\"info_value\":\"100\",\"info_unit\":\"mg\"}]}]"
////
////
////
////        Long l = Long.valueOf("");
////
////
////        "[{\"specDetailId\":\"1751622376815631\",\"pic\":\"ecom-shop-material/ALSUvYM_m_3c5e2222cc910c19b23d00b4bb2f7b6c_sx_205926_www800-800\"},{\"specDetailId\":\"1751622376815647\",\"pic\":\"ecom-shop-material/ALSUvYM_m_33e18d70342217ee9e290b4ea0713b2b_sx_330076_www800-800\"}]"
//////
//////        String[] arr1 = str1.split("/");
//////        String[] arr2 = str1.split("/");
////
////        StringBuilder sb = new StringBuilder();
////        sb.append("dawdawd");
////        System.out.println(sb.toString());
////        System.out.println(sb.toString());
//    }
}
